package managers;

import java.util.Date;

import beans.Adresse;
import beans.User;

public class UserManager {

	public User creerUser(String nom, String prenom, String mail, Date birth,
			String telephone, String password, Adresse adresse, boolean sexe) {
		User u = new User();
		u.setNom(nom);
		u.setPrenom(prenom);
		u.setMail(mail);
		u.setBirth(birth);
		u.setTelephone(telephone);
		u.setPassword(password);
		u.setAdresse(adresse);
		u.setSexe(sexe);
		return u;
	}

	public void updateUser(User u, String nom, String prenom, String mail,
			Date birth, String telephone, String password,int numero,String complementnumero,String rue,String codepostal,String ville,String departement,String region,
			boolean sexe) {
		u.setNom(nom);
		u.setPrenom(prenom);
		u.setMail(mail);
		u.setBirth(birth);
		u.setTelephone(telephone);
		u.setPassword(password);
		u.getAdresse().setCode_postal(codepostal);
		u.getAdresse().setComplement_numero(complementnumero);
		u.getAdresse().setDepartement(departement);
		u.getAdresse().setNumero(numero);
		u.getAdresse().setRegion(region);
		u.getAdresse().setRue(rue);
		u.getAdresse().setVille(ville);
		u.setSexe(sexe);
	}
}
